package com.lixinyue.working;

public class ValuetransferTest2 {
    public static void main(String[] args) {
        Data d = new Data();
        d.m=10;
        d.n=20;
        System.out.println("m="+d.m+",n="+d.n);
        ValuetransferTest2 v2 = new ValuetransferTest2();
        v2.swap(d);
        System.out.println("m="+d.m+",n="+d.n);
    }
   void swap(Data data)
   {
       int tmp=0;
       tmp= data.m;
       data.m=data.n;
       data.n=tmp;
   }
}
class Data{
    int m;
    int n;

}